package com.ybkj.o2o.zhuanche.manager;

import com.ybkj.o2o.zhuanche.controller.v4.ResultTransport;
import com.ybkj.o2o.zhuanche.entity.OrderTemp;

import java.math.BigDecimal;
import java.util.Date;
import java.util.List;
import java.util.Map;

public interface OrderTempManager {

  OrderTemp findByIdAndAppKey(Long orderId, String appKey);

  /**
   * 保存租车订单(临时订单).
   */
  
  OrderTemp insert(Long companyId, String companyName, Long passengerId, String passengerName,
      String passengerPhone, String showPhone, Long carTypeId, String channelName,
      String startAddress, String startAddressDetail, Double startLat, Double startLng,
      String endAddress, String endAddressDetail, Double endLat, Double endLng, Date serverDate,
      Double prestartPrice, Double premileagePrice, Double prerunTimePrice, Double budgetPay,
      Double shouldPay, Long couponId, Integer pretravelTime, Double premileage,
      String createOrderName, String appKey);

  void update(Long orderId, String appKey);

  /**
   * 保存专车临时订单.
   */
  
  ResultTransport createV4up(Long passengerId, String passengerName, String passengerPhone,
                             String userPhone, Long companyId, String companyName, String channelName, Date serverDate,
                             String startAddress, Double startLat, Double startLng, String endAddress, Double endLat,
                             Double endLng, Boolean prePay, Integer travelTime, Double mileage, String memo,
                             String flightNo, String trainNo, String operator, Long serviceTypeId, String serviceType,
                             String carTypes,
                             String serverUrl, Double couponMoney, String createOrderName, String appKey, Integer bookStatus,
                             Integer isMakePrice,BigDecimal makePrice);

  List<OrderTemp> queryByGroupId(Long groupId, String appKey);
  
  List<Map<String,Object>> countBookTempDriver(Long zhuanYuyueMax,Date zhuanYuyueTime,String appKey);

}
